//
//  FootModel.h
//  project
//
//  Created by 黄建华 on 2018/11/8.
//  Copyright © 2018年 黄建华. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface FoodEatModel : NSObject

@property (nonatomic, strong) NSString *date;                // 日期
@property (nonatomic, assign) NSInteger userId;              // 用餐的ID (删除用)
@property (nonatomic, assign) NSInteger serial;              // 用餐ID /第几餐
@property (nonatomic, assign) float caloryTotal;             // 总卡路里
@property (nonatomic, strong) NSArray *foodListArray;        // 食物列表
//@property (nonatomic, assign) NSInteger food_id;             // 食物ID
//@property (nonatomic, assign) NSInteger state;               // 固态液态
//@property (nonatomic, strong) NSString *name;                // 食物名称
//@property (nonatomic, strong) NSString *unit;                // 重量单位
//@property (nonatomic, strong) NSString *amount;              // 重量
//@property (nonatomic, assign) NSInteger calory;              // 食物卡路里

@end

@interface FoodModel : NSObject
@property (nonatomic, assign) BOOL     isSaveAllDay;   // 是否保存了全天
@property (nonatomic, strong) NSString *user_id;       // 用户ID
@property (nonatomic, assign) NSInteger yearCount;
@property (nonatomic, assign) NSInteger monthCount;
@property (nonatomic, assign) NSInteger weekCount;
@property (nonatomic, strong) NSString *dateString;    // 日期
@property (nonatomic, assign) NSInteger weight;        // 体重
@property (nonatomic, assign) NSInteger goal_weight;   // 目标体重
@property (nonatomic, assign) NSInteger stepTarget;    // 运动目标
@property (nonatomic, assign) NSInteger currentCalor;  // 当前消耗卡路里
@property (nonatomic, assign) NSInteger goal_calory;   // 总消耗(根据体重跟目标体重计算)/或设置的目标卡路里
@property (nonatomic, strong) NSArray  *array;         // 当天食谱用餐数组
@property (nonatomic, assign) NSInteger count;         // 当天用餐总数
@property (nonatomic, assign) BOOL finishQuality;      // 是否达标
@property (nonatomic, assign) NSInteger baseCalor;     // 基础消耗
@property (nonatomic, assign) NSInteger finish;
@property (nonatomic, strong) NSString *lastTime;
+ (FoodModel *)initWithDate:(NSDate *)date;
+ (FoodModel *)getFoodModelFromDBWithDayString:(NSString *)string;
+ (void)updateModelWithDic:(id)object withDateString:(NSString *)date;

@end

NS_ASSUME_NONNULL_END
